package ar.edu.unq.wannaplay.utils;

import org.apache.wicket.markup.html.link.Link;

import ar.edu.unq.wannaplay.pages.WPPage;

public class WPLinkCreatedPage extends Link {

    private WPPage pageToResponse;

    public WPLinkCreatedPage(final String id, final WPPage pageToLink) {
        super(id);
        this.setPageToResponse(pageToLink);

    }

    private static final long serialVersionUID = 1L;

    @Override
    public void onClick() {
        this.setResponsePage(this.getPageToResponse());
    }

    public void setPageToResponse(final WPPage pageToResponse) {
        this.pageToResponse = pageToResponse;
    }

    public WPPage getPageToResponse() {
        return pageToResponse;
    }

}
